function y = e_tet2(x)
%  Extended Three Exponential Terms 2 function
%x0=[-1, -1, ...,-1] 
%fmin=n/2
%Author:shi yangyang
n=length(x);
y=ones(1,n);
y(1)=(5.0*x(1)-3.0*x(1)^2-x(1)^3-3.0*x(2)+1.0)^2;
for i=2:1:n-1
    y(i)=(5.0*x(i)-3.0*x(i)^2-x(i)^3-x(i-1)-3.0*x(i+1)+1.0)^2;
end
y(n)=(5.0*x(n)-3.0*x(n)^2-x(n)^3-x(n-1)+1.0)^2;
y=sum(y);
